+#PROGRAM-ID ChargeInEMfield
+#VERSION 20240116
+# A mass m with charge q>0 is located in a static electro-magnetic field [0,0,E], [0,-B,0].
+# Find the trajetory
+# Differential equation (Lorentz force):
+# x'' = omega*z'
+# z'' = a*omega^2 - omega*x'
+# good start settings are omega=0,92, a*omega^2=0,05
+
+# coefficient definition
+alias coefficient.1 -> omega_x # -omega for x'
+coefficient.2 (+1) -> a*omega^2
+alias coefficient(3) -> omega_z # omega for z'
+
+# solving the DE
+iintegrate (x'') -> -x'
+iintegrate (-x') -> x
+
+coefficient.omega_x (-x') -> -omega*x'
+#cmultiply (-x', omega_x) -> omega*x'
+
+iintegrate (a*omega^2, -omega*x') -> -z' # input is z''
+iintegrate (-z') -> z
+invert (-z') -> z'
+
+coefficient.omega_z (z') -> omega*z'
+#cmultiply (z', omega_z) -> omega*z'
+assign omega*z' -> x''
+
+output(x) -> out.x
+output(z) -> out.z